package interfaces;

import com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException;
import entity.Manager;

import java.sql.Connection;
import java.util.List;

public interface ManagerDao {
    boolean insertOperator(Connection conn, Manager manager);

    boolean deleteOperator(Connection conn, int id);

    boolean updateOperator(Connection conn, Manager manager) throws MySQLIntegrityConstraintViolationException;

    Manager selectById(Connection conn, int id);

    Manager selectByName(Connection conn, String name);

    List<Manager> selectAll(Connection conn);

    Manager check(Connection conn, String name, String password);
}
